package 字符串;

public class StringBulider2 {
    public static void main(String[] args) {
       //字符串逆序
        String str="学习Java程序";
        System.out.println(str);
        System.out.println(new StringBuilder(str).reverse());

        String ns="";
        for (int i = 0; i < str.length(); i++) {
            ns=ns+str.substring(i,i+1);
        }
        System.out.println(ns);
    }
}
